import React, { Component } from 'react'
import Parent from './components/Parent'
// !#1 创建 Context 并导出
import { Context } from './context'
export default class App extends Component {
  state = {
    age: 18,
  }
  render() {
    // !#2 创建 Context.Provider 配合 value 提供数据
    return (
      <Context.Provider value={this.state.age}>
        <div>
          App
          <hr />
          <Parent />
        </div>
      </Context.Provider>
    )
  }
}
